import type {
  KeyEquipmentQueryListParams,
  KeyEquipmentSaveOrUpdateParams,
} from '@/types'
import { PAGING } from '@/constant'

export const defaultFormData: Partial<KeyEquipmentSaveOrUpdateParams>
  = {
    departmental: '',
    deviceName: '',
    deviceNumber: '',
    deviceModel: '',
    installationLocation: '',
    useEnergyType: '',
    devicePower: '',
    remarks: '',
    keyTechnicalData: '',
    loadRate: 0,
    runTime: 0,
    repairNum: 0,
    status: 0,
    planUpdateTime: '',
    project: '',
    index: '',
  }

export const formRules = generateCurrencyFormRules([
  'deviceName',
  'deviceModel',
])

export const defaultPagingParams: Partial<KeyEquipmentQueryListParams>
  = {
    ...PAGING.PARAMS,
    deviceName: '',
    deviceNumber: '',
    deviceModel: '',
    isEliminate: null as any,
  }
